package org.example.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 第三方划扣表
 * </p>
 *
 * @author libo
 * @since 2023-11-15
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("third_deduct")
public class ThirdDeduct implements Serializable, Updateable {

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 业务渠道
     */
    private Integer application;

    /**
     * 资金方id
     */
    private Integer capitalSide;

    /**
     * 资产类型
     */
    private String loanType;

    /**
     * 订单号
     */
    private String orderId;

    /**
     * 期数 多期逗号分割
     */
    private String periods;

    /**
     * 划扣金额
     */
    private BigDecimal amount;

    /**
     * 类型:按期period;按金额amount
     */
    private String deductType;

    /**
     * 代扣状态:0未代扣;1代扣中;2代扣成功;3代扣失败
     */
    private Integer deductState;

    /**
     * 通知状态:0未通知;1已通知;-1通知失败
     */
    private Integer noticeState;

    /**
     * 代扣失败原因
     */
    private String deductMsg;

    /**
     * 请求流水号
     */
    private String serialNumber;

    /**
     * 渠道支付流水号
     */
    private String thirdPayNum;

    /**
     * 实际划扣金额
     */
    private BigDecimal realDeductMoney;

    /**
     * 催收来源
     */
    private String urgeSource;

    /**
     * 其他信息
     */
    private String remark;

    /**
     * 记录创建时间
     */
    @TableField(fill = FieldFill.INSERT,updateStrategy = FieldStrategy.NEVER)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
